﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using Vega.USiteBuilder;
using umbraco.NodeFactory;
using Fonqi.Umbraco;

namespace SPCFMedicineInformer.DocumentTypes.Base
{
    [DocumentType( Name= "GlobalBase")]
    public class GlobalBase : DocumentTypeBase
    {
        private WebSite _websiteContent;
        public WebSite WebsiteContent
        {
            get
            {
                return _websiteContent ?? (_websiteContent = ContentHelper.GetByNodeId<WebSite>(Node.GetCurrent().PathIds()[1]));
            }
        }


        [DocumentTypeProperty(UmbracoPropertyType.ContentPicker, Name = "Umbraco Internal Redirect", Description = "Redirects all requests to another page without rewriting url")]
        public string UmbracoInternalRedirectId { get; set; }

        [DocumentTypeProperty(UmbracoPropertyType.TrueFalse, Name = "Hide In Navigation", Description = "Hides this page in menus and breadcrumb")]
        public bool UmbracoNaviHide { get; set; }
    }
}
